<script lang="ts" setup>

interface IEmits {
    (e:"update:modelValue",value:string):void
}
// 声明属性
const props= defineProps({
    modelValue:String
})

// 声明事件
const emits = defineEmits<IEmits>()

const changeModalValue=()=>{
    emits("update:modelValue","123");
}   

</script>

<template>
    <h1>子组件</h1>
    <p>modelValue:{{props.modelValue}}</p>
    <input type="button" value="修改modelValue" @click="changeModalValue">
</template>

<style lang="scss" scoped>
    
</style>
